package com.duoduo.admin.api.dto;

import java.io.File;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.List;

import org.springframework.core.io.ClassPathResource;


import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
@Data
@Tag(name="系统岗位表")
public class SysDeptDTO {
	
	@Schema(description="id")
	private Long id;
	@Schema(description="名称")
	private String name;
	@Schema(description="排序")
	private int sortOrder;
	@Schema(description="父类id")
	private Long parentId;
	
	@Schema(description="删除标识")
	private Boolean delFlag;
	@Schema(description="创建人")
	private String createBy;
	@Schema(description="创建时间")
	private LocalDateTime createTime;
	@Schema(description="修改人")
	private String updateBy;
	@Schema(description="更新时间")
	private LocalDateTime updateTime;
	 
	private List<SysDeptDTO> children;
	
	public static void main(String[] args) throws IOException {
		   String objPath = new ClassPathResource("").getURI().getPath();
		   String[] paths = objPath.split("/");
	
		   StringBuffer befURL = new StringBuffer();
		   for (int i = 1; i < 5; i++) {
			   befURL.append(paths[i]);
			   befURL.append(File.separator);
		   }
		   String projectUrl = befURL.toString()+"src"+File.separator+"main"+File.separator;
		   String  apiUrl = befURL.toString()+paths[5]+File.separator+"src"+File.separator+"main"+File.separator;
	        System.out.println(objPath);
	        System.out.println(apiUrl);
	        System.out.println(projectUrl);
	}
}
